import request from '@/utils/request'

export default {
  createOrder(data) {
    return request.post('/order/create', data)
  },
  payOrder(orderId) {
    return request.post(`/order/pay/${orderId}`)
  },
  getOrderList(params) {
    return request.get('/order/list', { params })
  },
  cancelOrder(orderId) {
    return request.post(`/order/cancel/${orderId}`)
  },
  getOrderDetail(orderId) {
    return request.get(`/order/detail/${orderId}`)
  }
}